package com.enterprise.support.utility.generator.menu;

import com.enterprise.support.utility.generator.CodeGenerator;
import com.enterprise.application.swing.jeta.AbstractPanel;

import javax.swing.*;
import java.awt.event.MouseListener;

/**
 * @author patrick liang
 * @version 1.0
 * @copyright (C) CTIC 2007
 * @date 2007-7-30
 * @desc 树形菜单抽象类
 */
public abstract class AbstractMenuTree implements MouseListener {

    /**
     * 取得树形菜单.
     *
     * @return JTree
     */
    public abstract JTree getMenuTree();

    /**
     * 显示Panel.
     *
     * @param panel AbstractPanel
     */
    public void showPanel(AbstractPanel panel) {
        CodeGenerator.getDefault().showPanel(panel);
    }
}
